package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 多对多关系集中映射
 * @TableName relevance
 */
@TableName(value ="relevance")
@Data
public class Relevance implements Serializable {
    /**
     * 流水号
     */
    @TableId
    private String id;

    /**
     * 描述
     */
    private String description;

    /**
     * 映射标识
     */
    private String key;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 授权时间
     */
    private Date operatetime;

    /**
     * 授权人
     */
    private String operatorid;

    /**
     * 第一个表主键ID
     */
    private String firstid;

    /**
     * 第二个表主键ID
     */
    private String secondid;

    /**
     * 第三个表主键ID
     */
    private String thirdid;

    /**
     * 扩展信息
     */
    private String extendinfo;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Relevance other = (Relevance) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getOperatetime() == null ? other.getOperatetime() == null : this.getOperatetime().equals(other.getOperatetime()))
            && (this.getOperatorid() == null ? other.getOperatorid() == null : this.getOperatorid().equals(other.getOperatorid()))
            && (this.getFirstid() == null ? other.getFirstid() == null : this.getFirstid().equals(other.getFirstid()))
            && (this.getSecondid() == null ? other.getSecondid() == null : this.getSecondid().equals(other.getSecondid()))
            && (this.getThirdid() == null ? other.getThirdid() == null : this.getThirdid().equals(other.getThirdid()))
            && (this.getExtendinfo() == null ? other.getExtendinfo() == null : this.getExtendinfo().equals(other.getExtendinfo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getOperatetime() == null) ? 0 : getOperatetime().hashCode());
        result = prime * result + ((getOperatorid() == null) ? 0 : getOperatorid().hashCode());
        result = prime * result + ((getFirstid() == null) ? 0 : getFirstid().hashCode());
        result = prime * result + ((getSecondid() == null) ? 0 : getSecondid().hashCode());
        result = prime * result + ((getThirdid() == null) ? 0 : getThirdid().hashCode());
        result = prime * result + ((getExtendinfo() == null) ? 0 : getExtendinfo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", description=").append(description);
        sb.append(", key=").append(key);
        sb.append(", status=").append(status);
        sb.append(", operatetime=").append(operatetime);
        sb.append(", operatorid=").append(operatorid);
        sb.append(", firstid=").append(firstid);
        sb.append(", secondid=").append(secondid);
        sb.append(", thirdid=").append(thirdid);
        sb.append(", extendinfo=").append(extendinfo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}